﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EZCRS.HCMS.Entity;
using EZCRS.HCMS.SqlClient;

namespace EZCRS.HCMS.Bll.baseinfo
{
    public class BllHCRS_AIR
    {
        /// <summary>
        /// 新增或修改一条信息
        /// </summary>
        /// <param name="_h_roomcode"></param>
        /// <returns></returns>
        public bool insertorupdate(HCRS_AIR _hcrs_air)
        {
            return new sql_hcrs_air().insertorupdate(_hcrs_air);
        }

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="page"></param>
        /// <param name="strwhere">查询条件</param>
        /// <param name="pagecount">返回页数总数</param>
        /// <returns></returns>
        public List<HCRS_AIR> getallbypage(int page, string strwhere, out int pagecount)
        {
            return new sql_hcrs_air().getallbypage(page, strwhere, out pagecount);
        }

        /// <summary>
        /// 返回所有符合条件的信息
        /// </summary>
        /// <param name="strwhere">条件</param>
        /// <returns></returns>
        public List<HCRS_AIR> getall(string strwhere)
        {
            return new sql_hcrs_air().getall(strwhere);
        }

        /// <summary>
        /// 返回一条信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public HCRS_AIR getitem(int id)
        {
            return new sql_hcrs_air().getitem(id);
        }

        #region 删除
        /// <summary>
        /// 删除一条信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool deleteitem(int id)
        {
            return new sql_hcrs_air().deleteitem(id);
        }

        /// <summary>
        /// 删除一批数据
        /// </summary>
        /// <param name="idlist"></param>
        /// <returns></returns>
        public bool deleteitem(string idlist)
        {
            return new sql_hcrs_air().deleteitem(idlist);
        }

        #endregion
    }
}
